//在月份、日期、小时等小于10前面补0
let padDate = function (value) {
    return value < 10 ? '0' + value : value;
};

// /顶部时间过滤
let formatDate = function (value) {//顶部时间过滤
    var date = new Date(value);
    var year = date.getFullYear();
    var month = padDate(date.getMonth() + 1);
    var day = padDate(date.getDate());
    var hours = padDate(date.getHours());
    var minutes = padDate(date.getMinutes());
    var seconds = padDate(date.getSeconds());
    return year + '-' + month + '-' + day + '-' + ' ' + hours + ':' + minutes + ':' + seconds;
}
// 事件日期星期几
let formatDateWeek = function (value) {
    const date = new Date(value);
    const month = padDate(date.getMonth() + 1);
    const day = padDate(date.getDate());
    const weekList = ["日", "一", "二", "三", "四", "五", "六"]
    const weelDay = date.getDay();
    return `${month}月${day}日 星期${weekList[weelDay]}   `
}
// 分割显示数字
let formatNum = function (value) {

    let str = '' + value
    let arr = str.split('').map(item => {
        return `<span>${item}</span>`
    })
    return `总数：${arr.join('')}`

}